﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AnimalFight.Lib.Interface;
using AnimalFight.Lib.EventHandlers;

namespace AnimalFight.Lib.Data
{
    public class Duck : AnimalBase, IAttack
    {
        public event AttackDelegate AttackEvent;

        public void Attack(EventHandlers.Animals target)
        {
            if (AttackEvent != null)
            {
                AttackEventHandler e = new AttackEventHandler
                {
                    AnimalName = this.Name,
                    AP = this.AP,
                    Target = target
                };

                AttackEvent(this, e);
            }
        }

        public override void Escape()
        {
            Console.WriteLine("Duck has escaped.");
        }
    }
}
